FROM java:8-jre
MAINTAINER zl
# add src tag  src是当前所在的目录,默认是当前dockerfile的目录,注意 只能是当前及其下级
ADD ./deploy /usr/local/deploy
#工作目录 exec进入容器空间的默认路径
WORKDIR /usr/local
ADD ./target/demo-1.0.0-SNAPSHOT.jar /usr/local/deploy
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
EXPOSE 8091
CMD java -jar /usr/local/deploy/demo-1.0.0-SNAPSHOT.jar